<template>
  <div class="hello">
    <h1>Hello World1</h1>
    <button @click="handleClick">+3</button>
  </div>
</template>

<script>
import $bus from '@/utils/bus'
export default {
  name: 'HelloWorld',
  methods: {
    handleClick() {
      // !#2 参数：事件名、传递的数据
      $bus.$emit('addCount', 3)
    }
  }
}
</script>
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
